<script type="text/javascript">
	function validateInfo() {
		
		var form = document.forms['infoForm'];
		var firstName = form.firstName.value;
		var lastName = form.lastName.value;
		// No blank first and last name
		if (firstName == '') {
			alert('First name is required! Please insert your first name!');
			return false;
		} else if(lastName == ''){
			alert('Last name is required! Please insert your last name!');
			return false;
		}
		return true;
	}
</script>

<div class="page-content" style="margin-left: 50px;">
	<div class="page-header position-relative">
		<h1>
			Customer Information
		</h1>
	</div><!--/.page-header-->

	<div class="row-fluid">
		<div class="span12">
			<!--PAGE CONTENT BEGINS-->

			<form onsubmit="return validateInfo()" class="form-horizontal" name="infoForm" method="post" action="changeInfoAction">
				<div class="control-group">
					<label class="control-label" for="first-name">First Name (*)</label>

					<div class="controls">
						<input name="firstName" id="firstName" placeholder="First Name" type="text" value="${currentCustomer.getFirstname()}">
					</div>
				</div>

			<div class="control-group">
					<label class="control-label" for="last-name">Last Name (*)</label>

					<div class="controls">
						<input name="lastName" id="lastName" placeholder="Last Name" type="text" value="${currentCustomer.getLastname()}">
					</div>
				</div>
				
				<div class="control-group">
					<label class="control-label" for="address">Address</label>

					<div class="controls">
						<input id="address" name="address" placeholder="Address" type="text" value="${currentCustomer.getAddress()}">
					</div>
				</div>
				
				<div class="control-group">
					<label class="control-label" for="phone">Phone</label>

					<div class="controls">
						<input name="phone" id="phone" placeholder="Phone" type="text" value="${currentCustomer.getPhone()}">
					</div>
				</div>
				
				<br>

				<div class="form-actions">
					<button class="btn btn-info" type="submit">
						<i class="icon-ok bigger-110"></i>
						Save Changes
					</button>

					&nbsp; &nbsp; &nbsp;
					<button class="btn" type="reset">
						<i class="icon-undo bigger-110"></i>
						Reset
					</button>
				</div>

			</form>
			<!--PAGE CONTENT ENDS-->
		</div><!--/.span-->
	</div><!--/.row-fluid-->
</div>